package dome4;

import java.util.Locale;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 王圆豪
 * Date: 2024-05-28
 * Time: 18:03
 */

class Solution {
    public int countSegments(String s) {
        int count = 0;
        for (String s1:
             s.split(" ")) {
            if (s1.equals("")){
                count++;
            }
        }
        return count;
    }
}

class Solution1 {
    public String toLowerCase(String s) {
        return s.toLowerCase();
    }
}

public class Example {
    String str = new String("good");
    char[ ] ch = { 'a' , 'b' , 'c' };
    public static void main1(String args[]){
        Example ex = new Example();
        ex.change(ex.str,ex.ch);
        System.out.print(ex.str + " and ");
        System.out.print(ex.ch);
    }
    public void change(String str,char ch[ ]){
        str = "test ok";
        ch[0] = 'g';
    }
}
